<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>批量申请列表</title>
</head>
<body>
	<div class="easyui-panel" data-options="fit:true,border:0">
		<table id="batchApplyListGrid"></table>
		
		<!-- 预览窗口  -->
		<div id="batchListDialog" class="easyui-dialog"  data-options="closed:true" style="width:100%;height:100%;">
		<%-- 	 <!-- 该页面为公共浏览页，所以当不同的页面调用此页面时需给一个表示，通过此标识开放一定的权限 。2：表示浏览操作 -->
			<jsp:include page="../MedicalShootManage/Shoot.jsp" >
				<jsp:param value="2" name="tag"/>
				<jsp:param value="batchListDialog" name="dialog"/>
			</jsp:include> --%>	
			<!-- <div  class="easyui-panel" data-options="href:ctx+'/MedicalShootManage/Shoot?tag=2&dialog=batchListDialog'" style="height: 100%;width:100%;"></div> -->
		</div>
	</div>
	
<script type="text/javascript">
var fsqid= '<%=request.getParameter("fsqid")%>';
$(function(){
	//加载数据表格
	$("#batchApplyListGrid").datagrid({
		url:ctx + '/Archiving/getBatchList',
		toolbar:"#",
		queryParams:{
			"fsqid" : fsqid
		},
		rownumbers:true,
		fitColumns:false,
		border : false,
		striped : true,
		fit : true,
		singleSelect: true,
		pagination : true,
		pageSize : 20,
		pageList : [ 20, 30,50 ],
		columns:[[
	        {field:'operat',title:'操作',width:80,align:'center',
	        	formatter:function(value,row,index){
	        		return "<button class='shootBtn' onclick='batchListBrowse("+index+")'>浏览</button>";
	        	}
	        },  
			{field:'1',title:'权限',width:80,align:'center'},  
			{field:'fzt',title:'状态',width:80,align:'center'},  
			{field:'FPRN',title:'病案号',width:120,align:'center'},  
			{field:'FCYDATE',title:'出院日期',width:100,align:'center',
				formatter:function(value){
					return new Date(value).format("yyyy-MM-dd");
				}	
			},  
			{field:'FTIMES',title:'次数',width:50,align:'center'},  
			{field:'FNAME',title:'姓名',width:80,align:'center'},  
			{field:'FAGE',title:'年龄',width:50,align:'center'},  
			{field:'FCYDEPT',title:'出院科室',width:100,align:'center'},  
			{field:'FZYID',title:'住院号',width:100,align:'center'},  
			{field:'FBARCODE',title:'条码号',width:160,align:'center'},  
			{field:'FRYDATE',title:'入院日期',width:100,align:'center',
				formatter:function(value){
					return new Date(value).format("yyyy-MM-dd");
				}	
			},  
			{field:'FZZDOCT',title:'主治医生',width:100,align:'center'},  
			{field:'1',title:'主要诊断',width:100,align:'center'},  
			{field:'1',title:'主要手术',width:120,align:'center'}
			
		 ]]
		       
	});
})


//浏览
function batchListBrowse(index){
	var rows = $("#batchApplyListGrid").datagrid("getRows")[index];
	$("#batchListDialog").dialog({
		maximizable : true,
		closed : false,
		modal : true,
		href: ctx+'/MedicalShootManage/BrowsePage?tag=2&dialog=batchListDialog&fprn='+rows.FPRN + '&fzyid=' +rows.FZYID 
				+ '&ftimes='+rows.FTIMES+ '&fname='+encodeURI(encodeURI(rows.FNAME))+ '&fcydate='+new Date(rows.FCYDATE).format("yyyy-MM-dd")
				+ '&fbarcode='+rows.fbarcode,
		title : ''// "拍摄"
	});
	
}
</script>
</body>
</html>